package cn.numeron.wxarticle.api.wxarticle

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import cn.numeron.common.Identifiable
import com.google.gson.annotations.SerializedName
import java.util.*

@Entity(tableName = "wx_article")
data class WxArticle(

    @ColumnInfo(name = "author")
    val author: String,

    @ColumnInfo(name = "title")
    val title: String,

    @ColumnInfo(name = "link")
    val link: String,

    @SerializedName("shareDate")
    @ColumnInfo(name = "share_time")
    val shareTime: Date,

    @PrimaryKey
    @ColumnInfo(name = "id")
    val id: Long

) : Identifiable<Long> {

    override val identity: Long
        get() = id

}